<div class="title">
  <h1><%=h @palace.name %></h1>
</div>

<div class="content">
  <table>
    <tr>
      <td class="description">Position</td>
      <td class="def" id="center"><%=h @palace.position1 %>:<%=h @palace.position2 %>:<%=h @palace.position3 %></td>
    </tr>
    <tr>
      <td class="description">Baum des Lebens</td>
      <td class="def" id="right"><%=h @palace.baum_des_lebens %></td>
    </tr>
    <tr>
      <td class="description">Kriegsbrunnen</td>
      <td class="def" id="right"><%=h @palace.kriegsbrunnen %></td>
    </tr>
    <tr>
      <td class="description">Palasthof</td>
      <td class="def" id="right"><%=h @palace.palasthof %></td>
    </tr>
    <tr>
      <td class="description">Geheime Grotte</td>
      <td class="def" id="right"><%=h @palace.geheime_grotte %></td>
    </tr>
    <tr>
      <td class="description">Kräuterschule</td>
      <td class="def" id="right"><%=h @palace.kraeuterschule %></td>
    </tr>
    <tr>
      <td class="description">Kristallhöhle</td>
      <td class="def" id="right"><%=h @palace.kristallhoehle %></td>
    </tr>
    <tr>
      <td class="description">Steinwurzel</td>
      <td class="def" id="right"><%=h @palace.steinwurzel %></td>
    </tr>
    <tr>
      <td class="description">Harzader</td>
      <td class="def" id="right"><%=h @palace.harzader %></td>
    </tr>
    <tr>
      <td class="description">Xhodotorischer Kokon</td>
      <td class="def" id="right"><%=h @palace.xhodotorischer_kokon %></td>
    </tr>
    <tr>
      <td class="description">Heldenstatue</td>
      <td class="def" id="right"><%=h @palace.heldenstatue %></td>
    </tr>
    <tr>
      <td class="description">Zuchtstation</td>
      <td class="def" id="right"><%=h @palace.zuchtstation %></td>
    </tr>
    <tr>
      <td class="description">Steinmantel</td>
      <td class="def" id="right"><%=h @palace.steinmantel %></td>
    </tr>
    <tr>
      <td class="description">Kristallturm</td>
      <td class="def" id="right"><%=h @palace.kristallturm %></td>
    </tr>
    <tr>
      <td class="description">Irres Auge</td>
      <td class="def" id="right"><%=h @palace.irres_auge %></td>
    </tr>
    <tr>
      <td class="description">Kristallines Katapult</td>
      <td class="def" id="right"><%=h @palace.kristallines_katapult %></td>
    </tr>
  </table>

  <div class="berechnung">
    <table>
      <tr>
        <td class="description">Zeit</td>
        <% form_tag(:action => 'berechne_zeit') do %>
          <td class="input">
            <%= hidden_field_tag 'palace_id', @palace.id %>
            <%= hidden_field_tag 'player_id', @player.id %>
            <%= text_field_tag :kosten, params[:kosten], :class => "number" %>
          <% end %>
        </td>
        <td class="button">
          <%= submit_tag 'Berechne', :name => nil %>
        </td>
        <td class="result">
          <%=h(flash[:result_zeit]) %>
        </td>
      </tr>
      <tr>
        <td class="description">Mana</td>
        <% form_tag(:action => 'berechne_mana') do %>
          <td class="input">
            <%= hidden_field_tag 'palace_id', @palace.id %>
            <%= hidden_field_tag 'player_id', @player.id %>
            <%= text_field_tag :zeit, params[:zeit], :class => "number" %>
          </td>
          <td class="button">
            <%= submit_tag 'Berechne', :name => nil %>
          </td>
        <% end %>
        <td class="result">
          <%=h(flash[:result_mana]) %>
        </td>
      </tr>
    </table>
  </div>
</div>

<% content_for :navigation do %>
  <li>
    <%= link_to 'Bearbeiten', edit_player_palace_path(@player, @palace) %>
  </li>
  <li>
    <%= link_to 'Paläste', player_palaces_path(@player) %>
  </li>
<% end %>